﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WHC.Hotel.UI.Report
{
    public partial class FrmReport : BaseForm
    {
        public FrmReport()
        {
            InitializeComponent();
        }

        private void btnKFCustomer_Click(object sender, EventArgs e)
        {
            KFCustomerReport dlg = new KFCustomerReport();
            dlg.Show();
        }

        private void btnKFCheckout_Click(object sender, EventArgs e)
        {
            KFCheckoutReport dlg = new KFCheckoutReport();
            dlg.Show();
        }
        
        private void btnKFCheckOutStatus_Click(object sender, EventArgs e)
        {
            KFCheckOutStatusReport dlg = new KFCheckOutStatusReport();
            dlg.Show();
        }  

        private void btnKFConsumption_Click(object sender, EventArgs e)
        {
            KFConsumptionReport dlg = new KFConsumptionReport();
            dlg.Show();
        }

        private void btnKFMoneyDetail_Click(object sender, EventArgs e)
        {
            KFMoneyDetailReport dlg = new KFMoneyDetailReport();
            dlg.Show();
        }

        private void btnKFBusiness_Click(object sender, EventArgs e)
        {
            KFBusinessReport dlg = new KFBusinessReport();
            dlg.Show();
        }

        private void btnKFConsumptionCate_Click(object sender, EventArgs e)
        {
            KFConsumptionCateReport dlg = new KFConsumptionCateReport();
            dlg.Show();
        }

        private void btnNightCheck_Click(object sender, EventArgs e)
        {
            KFNightCheckReport dlg = new KFNightCheckReport();
            dlg.Show();
        }

        private void btnTopTrade_Click(object sender, EventArgs e)
        {
            KFTopTradeReport dlg = new KFTopTradeReport();
            dlg.Show();
        }

        private void btnKFBackConsumption_Click(object sender, EventArgs e)
        {
            KFBackConsumptionReport dlg = new KFBackConsumptionReport();
            dlg.Show();
        }

        private void btnCLCustomer_Click(object sender, EventArgs e)
        {
            TeaCustomerReport dlg = new TeaCustomerReport();
            dlg.Show();
        }

        private void btnKTVCustomer_Click(object sender, EventArgs e)
        {
            KTVCustomerReport dlg = new KTVCustomerReport();
            dlg.Show();
        }

        private void btnCLConsumption_Click(object sender, EventArgs e)
        {
            TeaConsumptionReport dlg = new TeaConsumptionReport();
            dlg.Show();
        }

        private void btnKTVConsumption_Click(object sender, EventArgs e)
        {
            KTVConsumptionReport dlg = new KTVConsumptionReport();
            dlg.Show();
        }

        private void btnCLBackConsumerList_Click(object sender, EventArgs e)
        {
            TeaBackConsumptionReport dlg = new TeaBackConsumptionReport();
            dlg.Show();
        }

        private void btnKTVBackConsumerList_Click(object sender, EventArgs e)
        {
            KTVBackConsumptionReport dlg = new KTVBackConsumptionReport();
            dlg.Show();
        }

        private void btnTeaCheckOutStatus_Click(object sender, EventArgs e)
        {
            TeaCheckOutStatusReport dlg = new TeaCheckOutStatusReport();
            dlg.Show();
        }

        private void btnTeaMoneyDetail_Click(object sender, EventArgs e)
        {
            TeaCheckoutReport dlg = new TeaCheckoutReport();
            dlg.Show();
        }

        private void btnKTVCheckOutStatus_Click(object sender, EventArgs e)
        {
            KTVCheckOutStatusReport dlg = new KTVCheckOutStatusReport();
            dlg.Show();
        }

        private void btnKTVMoneyDetail_Click(object sender, EventArgs e)
        {
            KTVCheckoutReport dlg = new KTVCheckoutReport();
            dlg.Show();
        }

        private void btnKTVBusiness_Click(object sender, EventArgs e)
        {
            KTVBusinessReport dlg = new KTVBusinessReport();
            dlg.Show();
        }

        private void btnTeaBusiness_Click(object sender, EventArgs e)
        {
            TeaBusinessReport dlg = new TeaBusinessReport();
            dlg.Show();
        }

        private void btnKTVTopTrade_Click(object sender, EventArgs e)
        {
            KTVTopTradeReport dlg = new KTVTopTradeReport();
            dlg.Show();
        }

        private void btnTeaTopTrade_Click(object sender, EventArgs e)
        {
            TeaTopTradeReport dlg = new TeaTopTradeReport();
            dlg.Show();
        }

        private void btnTeaConsumptionCate_Click(object sender, EventArgs e)
        {
            TeaConsumptionCateReport dlg = new TeaConsumptionCateReport();
            dlg.Show();
        }

        private void btnKTVConsumptionCate_Click(object sender, EventArgs e)
        {
            KTVConsumptionCateReport dlg = new KTVConsumptionCateReport();
            dlg.Show();
        }

        private void FrmReport_Load(object sender, EventArgs e)
        {
            InitAuthorizedUI();
        }

        /// <summary>
        /// 根据权限屏蔽功能
        /// </summary>
        private void InitAuthorizedUI()
        {

            
            this.btnKFBackConsumption.Enabled = Portal.gc.HasFunction("Report/Room/KFBackConsumption");
            this.btnKFBusiness.Enabled = Portal.gc.HasFunction("Report/Room/KFBusiness");
            this.btnKFCheckout.Enabled = Portal.gc.HasFunction("Report/Room/KFCheckout");
            this.btnKFCheckOutStatus.Enabled = Portal.gc.HasFunction("Report/Room/KFCheckOutStatus");
            this.btnKFConsumption.Enabled = Portal.gc.HasFunction("Report/Room/KFConsumption");
            this.btnKFConsumptionCate.Enabled = Portal.gc.HasFunction("Report/Room/KFConsumptionCate");
            this.btnKFCustomer.Enabled = Portal.gc.HasFunction("Report/Room/KFCustomer");
            this.btnKFMoneyDetail.Enabled = Portal.gc.HasFunction("Report/Room/KFMoneyDetail");
            this.btnKFTopTrade.Enabled = Portal.gc.HasFunction("Report/Room/KFTopTrade");
            this.btnNightCheck.Enabled = Portal.gc.HasFunction("Report/Room/KFNightCheck");

            //this.btnCLBackConsumerList.Enabled = Portal.gc.HasFunction("Report/Tea/TeaBackConsumption");
            //this.btnCLConsumption.Enabled = Portal.gc.HasFunction("Report/Tea/TeaConsumption");
            //this.btnCLCustomer.Enabled = Portal.gc.HasFunction("Report/Tea/TeaCustomer");
            //this.btnTeaBusiness.Enabled = Portal.gc.HasFunction("Report/Tea/TeaBusiness");
            //this.btnTeaCheckOutStatus.Enabled = Portal.gc.HasFunction("Report/Tea/TeaCheckOutStatus");
            //this.btnTeaConsumptionCate.Enabled = Portal.gc.HasFunction("Report/Tea/TeaConsumptionCate");
            //this.btnTeaMoneyDetail.Enabled = Portal.gc.HasFunction("Report/Tea/TeaCheckout");
            //this.btnTeaTopTrade.Enabled = Portal.gc.HasFunction("Report/Tea/TeaTopTrade");
            
            //this.btnKTVBackConsumerList.Enabled = Portal.gc.HasFunction("Report/KTV/KTVBackConsumption");
            //this.btnKTVBusiness.Enabled = Portal.gc.HasFunction("Report/KTV/KTVBusiness");
            //this.btnKTVCheckOutStatus.Enabled = Portal.gc.HasFunction("Report/KTV/KTVCheckOutStatus");
            //this.btnKTVConsumption.Enabled = Portal.gc.HasFunction("Report/KTV/KTVConsumption");
            //this.btnKTVConsumptionCate.Enabled = Portal.gc.HasFunction("Report/KTV/KTVConsumptionCate");
            //this.btnKTVCustomer.Enabled = Portal.gc.HasFunction("Report/KTV/KTVCustomer");
            //this.btnKTVMoneyDetail.Enabled = Portal.gc.HasFunction("Report/KTV/KTVCheckout");
            //this.btnKTVTopTrade.Enabled = Portal.gc.HasFunction("Report/KTV/KTVTopTrade");

        }

        private void btnKFSigning_Click(object sender, EventArgs e)
        {
            KFSigningReport dlg = new KFSigningReport();
            dlg.Show();
        }

        private void btnTeaSigning_Click(object sender, EventArgs e)
        {
            TeaSigningReport dlg = new TeaSigningReport();
            dlg.Show();
        }

        private void btnKTVSigning_Click(object sender, EventArgs e)
        {
            KTVSigningReport dlg = new KTVSigningReport();
            dlg.Show();
        }

    }
}
